/*
 * singleton.cpp
 *
 *  Created on: Oct 5, 2008
 *      Author: tandaica0612
 */
#include <iostream>
using namespace std;
class Singleton{
private:
	static Singleton* _instance;
	Singleton();
public:
	static Singleton* get_instance();
};
Singleton* Singleton::_instance = 0;
Singleton* Singleton::get_instance(){
	if(Singleton::_instance == 0){
		Singleton::_instance = new Singleton();
	}
	return Singleton::_instance;
}
Singleton::Singleton(){
	cout << "Singleton";
}
/*
int main(){
	Singleton* single = Singleton::get_instance();
	return 0;
}
**/
